package com.healthy.mapper;
import com.healthy.entity.TestInformation;
import org.apache.ibatis.annotations.*;
import java.util.List;

public interface TestInformationMapper {
    //    查询所有
    @Select("select * from t_testinformation")
    List<TestInformation> culist();

    //    添加
    @Insert("insert into t_testinformation (name, examination, content,doctor) values ( #{testinformation.name}, #{testinformation.examination}, #{testinformation.content}, #{testinformation.doctor})")
    int cuInsert(@Param("testinformation") TestInformation testInformation);

    //删除
    @Delete("delete from t_testinformation where id = #{id}")
    int cuDeleteByid(int id);

    //修改
    @Update("update t_testinformation set name = #{name}, examination = #{examination}, content = #{content}, doctor = #{doctor} where id = #{id}")
    int cuUpdateByid(@Param("id") int id,@Param("name") String name,@Param("examination") String examination,@Param("content") String content,@Param("doctor") String doctor);
}
